# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
pkgname=py3-ansicolor
_pyname=ansicolor
pkgver=0.2.6
_commit=a5a5c31dc6de5c864a0c5684ae326972573a712b # Upstream didn't tag a new github release
pkgrel=1
pkgdesc="A library to produce ansi color output, highlighting and diffing"
url="https://github.com/numerodix/ansicolor"
arch="noarch"
license="Apache-2.0"
depends="python3"
checkdepends="py3-pytest"
# no tests in artifact on PyPI
source="$pkgname-$_commit.tar.gz::https://github.com/numerodix/ansicolor/archive/$_commit.tar.gz"

builddir="$srcdir/$_pyname-$_commit"

build() {
	python3 setup.py build
}

check() {
	TERM=linux python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="fe886cdfc363de6d6a5abd35311a47fb15307eab7648d2532a575969887bec6abb4fbfdd7842f4289a1a1fb7772ed49750885fbaea91282fa2bd65c71725421d  py3-ansicolor-a5a5c31dc6de5c864a0c5684ae326972573a712b.tar.gz"
